<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script type="text/javascript">
    var a=5;
    var b=1;
    for (var i = 1; i <=a ; i++) {
        b*=i;
    }
    alert(b);
</script>
</body>
</html>